var OutWarehouseDetail = function () {
  var template = /* html */ `
    <div style="padding:0 10px 10px;"  v-loading.fullscreen.lock="loading">
      <el-table fit stripe border :data="detailList">
        <el-table-column :resizable="false" prop="outType" label="类型" :auto-width="true" min-width="70px" align="center">
          <template slot-scope="props">
            <span>{{i18n.getMsg('warehouse.warehouseOutOrderType.'+props.row.outType)}}</span>
          </template>
        </el-table-column>
        <el-table-column :resizable="false" prop="companyOrderId" label="订单编号" :auto-width="true" min-width="80px" header-align="center"></el-table-column>
        <el-table-column :resizable="false" prop="outCount" label="出库数" min-width="80px" align="center"></el-table-column>
        <el-table-column :resizable="false" prop="time" label="出库时间" width="85px" align="center"></el-table-column>
      </el-table>
    </div>
  `;

  return {
    props: {
      product: {
        type: Object,
        required: true
      }
    },

    data: function () {
      return {
        loading: false,
        detailList: [],
        i18n: i18n
      };
    },

    created: function () {
      this.setDetailList();
    },

    methods: {
      setDetailList: function () {
        var product = this.product;
        this.loading = true;
        var self = this;
        ajaxRequest("warehouse/getFinishOutOrder", {
          orderId: product.orderId,
          rowIndex: product.rowIndexs
        }).then(function (detailList) {
          self.detailList = detailList;
          self.loading = false;
        }).catch(function () {
          self.loading = false;
        });
      }
    },

    template: template
  };
}();